function [XD,YD]=p_circle(r)
% p_circle: Return vertices of a circle
%
% SYNTAX:
%   [XD,YD] = p_circle(r)
%   [XY] = p_circle(r)
%   Return vertices of a circle with radius r

%   Author: Hongbin Ma
%   Last updated: 2009-6-2 with MATLAB 6.5
%   Problems or suggestions? Email me: mathmhb[at]163.com

w=[-pi:pi/30:pi];
XD=r*cos(w);
YD=r*sin(w);
if nargout<2,
    XD=[XD;YD]';
end;
